<?php echo form_open(base_url().'journal/admin/students'); ?>
	<?foreach ($groups as $result_groups){?>
	<p><div id="title_bg"><?=$result_groups['code']?></div></p>
	<table class="groups">
	    <tr>
	        <th id="left"><div><?=lang('name_student')?></div></th>
	        <th><div><?=lang('email')?></div></th>
	        <th id="right"><div><?=lang('admin_button_select')?></div></th>
	    </tr>
		<?foreach ($students as $result_students){?>
			<?if($result_groups['id'] == $result_students['id_group']) {?>
			<tr>
				<td id='left'><div id='groups-div'><a href="<?=base_url().'journal/admin/students/edit/'.$result_students['id']?>" title="<?=lang('admin_button_edit')?>"><?=$result_students['name']?></a></div></td>
				<td><div id='groups-div'><?if($result_students['email']) echo $result_students['email']; else echo '-';?></div></td>
				<td id='right'><div id='groups-div'><input name='students[]' type='checkbox' value="<?=$result_students['id']?>"></div></td>
			</tr>
			<?}?>
		<?}?>
	</table>
	<?}?>
<p style="width:80%;text-align:right;margin-top:20px;"><a href="<?=base_url().'journal/admin/students/add'?>"><button type="button"><?=lang('admin_button_create')?></button></a> <input name="delete_student_submit" type="submit" value="<?=lang('admin_button_delete')?>"></p>
</form>